import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
import { Document } from 'mongoose';

export type DeviceDocument = DeviceRecord & Document;


@Schema()
export class DeviceRecord extends Document<number> {
    @Prop()
    _id : number;
    
    @Prop({type : Object})
    data:object;

    @Prop({type : Object})
    port : object;
}

export const DeviceSchema = SchemaFactory.createForClass(DeviceRecord);